// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';


// 超级管理员登录
import adminLogin from '@/views/adminLogin';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */

/**
 * 订单管理
 */
// 交易订单
import Order from '@/views/pay/Order';
/**
 * 系统管理
 */
// 用户管理
import user from '@/views/user/user';
import parkVipUser from "@/views/user/parkVipUser";
import vipUser from "@/views/user/vipUser";

// 菜单管理
import Module from '@/views/system/Module';
// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';
// 系统环境变量
import Variable from '@/views/system/Variable';
// 权限管理
import Permission from '@/views/system/Permission';
/**
 * 支付管理
 */
// 支付配置信息
import MachineConfig from '@/views/machine/MachineConfig';
// 支付配置
import Config from '@/views/pay/Config';
/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';

// 图表界面
import statistics from '@/views/charts/statistics';

import ParkingOrder2 from '@/views/parkAdmin/ParkingOrder2';
import ParkingLotAddress from '@/views/parkAdmin/ParkingLotAddress';
import echartsTest from '@/views/parkAdmin/echartsTest';
import echartsTest2 from '@/views/parkAdmin/echartsTest2';


import Parking from '@/views/shenheParking/Parking';
import AdminPermission from '@/views/shenheParking/Permission';
import AdminRole from '@/views/shenheParking/Role';
import AdminModule from '@/views/shenheParking/Module';
import AdvertisementPlayed from '@/views/salesman/AdvertisementPlayed';
import Equipment from '@/views/salesman/Equipment';
import WebSocketClient from '@/views/salesman/WebSocketClient';
//地图页面
import map from '@/views/map/MainMap';

//Vip部分
import VIPTypeList from '@/views/vip/VIPTypeList'
import VIPUserList from '@/views/vip/VIPUserList'
import PKVIPTypeList from '@/views/vip/PKVIPTypeList'
import PKVIPUserOrderList from '@/views/vip/PKVIPUserOrderList'
import PKCouponList from '@/views/vip/PKCouponList'

import blogin from '@/views/backUser/backUserLogin';
import bregister from '@/views/backUser/backUserRegister';
import feedback from '@/views/fankui/feedback';
import parking from '@/views/parking/parkingClass';
import price from '@/views/parking/price';

import carchecked from '@/views/carchecked/Checked';

// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
    routes: [
      {
        path: '/',
        name: '',
        component: adminLogin,
        hidden: true,
        meta: {
            requireAuth: false
        }
      },

      {
        path: '/map',
        name: '',
        component: map,
        hidden: true,
        meta: {
            requireAuth: false
        }
      },

      {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
      },
      {
      path: '/adminLogin',
      name: '超级管理员登录',
      component: adminLogin,
      hidden: true,
      meta: {
        requireAuth: false
      }
    },
      {
      path: '/blogin',
      name: 'back登录',
      component: blogin,
      hidden: true,
      meta: {
        requireAuth: false
      }
    },
      {
      path: '/bregister',
      name: 'back注册',
      component: bregister,
      hidden: true,
      meta: {
        requireAuth: false
      }
      },


      {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [

          //反馈管理
          {
            path: '/fankui/feedback',
            name: 'feedback',
            component: feedback
          },

          //vip管理
          {
            path: '/vip/VIPTypeList',
            name: 'VIPTypeList',
            component: VIPTypeList
          },
          {
            path: '/vip/VIPUserList',
            name: 'VIPUserList',
            component: VIPUserList
          },
          {
            path: '/vip/PKVIPTypeList',
            name: 'PKVIPTypeList',
            component: PKVIPTypeList  //PKVIPUserOrderList.vue
          },
          {
            path: '/vip/PKVIPUserOrderList',
            name: 'PKVIPUserOrderList',
            component: PKVIPUserOrderList  //PKCouponList.vue
          },
          {
            path: '/vip/PKCouponList',
            name: 'PKCouponList',
            component: PKCouponList
          },

          {
            path: '/parkAdmin/ParkingOrder2',
            name: '停车场交易订单',
            component: ParkingOrder2,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/parkAdmin/echartsTest',
            name: 'echartsTest',
            component: echartsTest,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/parkAdmin/echartsTest2',
            name: 'echartsTest2',
            component: echartsTest2,
            meta: {
              requireAuth: true
            }
          },

          {
            path: '/carchecked/Checked',
            name: '申述审核',
            component: carchecked,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/pay/Order',
            name: '交易订单',
            component: Order,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/user/user',
            name: '用户管理',
            component: user,
            meta: {
                requireAuth: true
            }
        }, {
          path: '/user/vipUser',
          name: '会员用户管理',
          component: vipUser,
          meta: {
            requireAuth: true
          }
        },{
            path: '/user/parkVipUser',
            name: '租期用户管理',
            component: parkVipUser,
            meta: {
              requireAuth: true
            }
        }, {
            path: '/system/Module',
            name: '菜单管理',
            component: Module,
            meta: {
                requireAuth: true
            }
        },
          {
            path: '/system/Role',
            name: '角色管理',
            component: Role,
            meta: {
                requireAuth: true
            }
        },
          {
            path: '/system/Dept',
            name: '公司管理',
            component: Dept,
            meta: {
                requireAuth: true
            }
        },
          {
            path: '/system/Variable',
            name: '系统环境变量',
            component: Variable,
            meta: {
                requireAuth: true
            }
        },
          {
            path: '/system/Permission',
            name: '权限管理',
            component: Permission,
            meta: {
                requireAuth: true
            }
        },
          {
            path: '/machine/MachineConfig',
            name: '支付配置信息',
            component: MachineConfig,
            meta: {
                requireAuth: true
            }
        },
          {
            path: '/pay/Config',
            name: '支付配置',
            component: Config,
            meta: {
                requireAuth: true
            }
        },
          {
            path: '/druid/login',
            name: '监控查询',
            component: druidLogin,
            meta: {
                requireAuth: true
            }
        },
          {
            path: '/charts/statistics',
            name: '数据可视化',
            component: statistics,
            meta: {
                requireAuth: true
            }
        },
          {
            path: '/shenheParking/Parking',
            name: '停车厂审核',
            component: Parking,
            hidden: true,
            meta: {
              requireAuth: false
            }
          },

          {
            path: '/shenheParking/Role',
            name: '角色管理',
            component: AdminRole,
            hidden: true,
            meta: {
              requireAuth: false
            },

          },
          {
            path: '/shenheParking/Module',
            name: '角色管理',
            component: AdminModule,
            hidden: true,
            meta: {
              requireAuth: false
            },

          },
          {
            path: '/parking/manager_price',
            name: '价格管理',
            component: price,
            hidden: true,
            meta: {
              requireAuth: false
            }
          }
          ,{
            path: '/parking/manager',
            name: '车场管理',
            component: parking,
            hidden: true,
            meta: {
              requireAuth: false
            }
          },{
            path: '/salesman/WebSocketClient',
            name: '播放',
            component: WebSocketClient,
            hidden: true,
            meta: {
              requireAuth: false
            }
          },{
            path: '/salesman/Equipment',
            name: '设备管理',
            component: Equipment,
            hidden: true,
            meta: {
              requireAuth: false
            }
          },{
            path: '/salesman/AdvertisementPlayed',
            name: '播放记录',
            component: AdvertisementPlayed,
            hidden: true,
            meta: {
              requireAuth: false
            }
          }

        ]
    }]
})
